package com.xuecheng.content.service;

import com.xuecheng.base.exception.XueChengPlusException;
import com.xuecheng.content.model.dto.CoursePreviewDto;
import com.xuecheng.content.model.po.CoursePublish;

import java.io.File;

/**
 * @author woldier
 * @version 1.0
 * @description 课程发布预览service
 * @date 2023/3/16 18:43
 **/
public interface CoursePublishService {


    /**
     * @description 获取课程预览所需要的信息
     * @param courseId  课程id
     * @return com.xuecheng.content.model.dto.CoursePreviewDto
     * @author: woldier
     * @date: 2023/3/16 18:45
     */
    public CoursePreviewDto getCoursePreviewInfo(Long courseId);

    /**
     * @author woldier
     * @version 1.0
     * @description 课程预发布
     * @date 2023/3/25 18:50
     **/

    /**
     * @description 提交审核
     * @param companyId 公司id
     * @param courseId  课程id
     * @return void
     * author: woldier
     * @date: 2023/3/25 18:55
     */
    void commitAudit(Long companyId,Long courseId) throws XueChengPlusException;

    /**
     * @description 课程发布
     * @param courseId  课程id
     * @return void
     * @author: woldier
     * @date: 2023/3/26 17:25
     */
    void coursePublish(Long companyId,Long courseId) throws XueChengPlusException;

    /**
     * @description TODO 课程发布成功写入消息表
     * @param courseId
     * @return void
     * @author: woldier
     * @date: 2023/3/26 20:15
     */
    public void saveCoursePublishMessage(Long courseId);
    /**
     * @description 课程静态化
     * @param courseId  课程id
     * @return File 静态化文件
     * @author Mr.M
     * @date 2022/9/23 16:59
     */
    public File generateCourseHtml(Long courseId);
    /**
     * @description 上传课程静态化页面
     * @param file  静态化文件
     * @return void
     * @author Mr.M
     * @date 2022/9/23 16:59
     */
    public void  uploadCourseHtml(Long courseId,File file);

    /**
     * @description 课程发布状态正常则正常返回，否则返回空
     * @param courseId
     * @return
     */
    CoursePublish getCoursePublish(Long courseId);
}